#include "VCPlugInHeaders.h"

#include "Barcode4inID.h"
#include "CToolCursorProvider.h"

/** SnapCursorProvider
	implements a cursor provider for toolbox SnapShot tool.
  
	
	@ingroup snapshot
*/
class Barcode4inCursorProvider : public CToolCursorProvider
{
	public:
		/**
			Constructor.
			@param boss interface ptr from boss object on which this interface is aggregated.
		*/
		Barcode4inCursorProvider( IPMUnknown* boss ) 
			: CToolCursorProvider(boss) {}

		/** 
			Destructor.
		*/
		~Barcode4inCursorProvider() {}

		/**
			It is called when mouse enters a region assigned to this provider. 
			It returns the CursorSpec describing the cursor to be displayed. 
			Default behavior: returns kCrsrPointer.
		*/		
		virtual CursorSpec	GetCursor(IControlView* viewUnderMouse, const SysPoint globalMouse, ICursorMgr::eCursorModifierState modifiers) const;
};

/* CREATE_PMINTERFACE
 Binds the C++ implementation class onto its 
 ImplementationID making the C++ code callable by the 
 application.
*/
CREATE_PMINTERFACE(Barcode4inCursorProvider, kBarcode4inCursorProviderImpl )


/* GetCursor
*/
CursorSpec Barcode4inCursorProvider::GetCursor(IControlView* viewUnderMouse, const SysPoint globalMouse, ICursorMgr::eCursorModifierState modifiers) const
{
	CursorSpec defaultCursor = CToolCursorProvider::GetCursor(viewUnderMouse, globalMouse, modifiers);
	if (defaultCursor.GetID() != kCrsrNone)
		return defaultCursor;

	return CursorSpec(kBarcode4inPluginID, kCursorBarcode4inResourceID);
}
